<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Author Rahul Ashok for SUTD -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<style type="text/css">
H1
{
    COLOR: #000000;
    FONT-FAMILY: 'Cambria';
    TEXT-TRANSFORM: capitalize
}
h3 {
    font-family: Cambria;
}

</style>
<title>Control Page</title>
</head>


<f:view>
<h:form>
		<h:graphicImage url="/SUTD_Logo.jpg" style="height: 22px; width: 95px; " onkeypress="http://www.sutd.edu.sg"></h:graphicImage>
		<center>

	
		<h1><h:outputLabel value="Future Living Lab" style="color:green; text-decoration:underline"></h:outputLabel></h1>
		
		<h3>Z-Wave Devices</h3><br> <h3 style="color:green">Smart Plugs</h3>
		<h3>
				<h:panelGrid columns="6" border="1">
				<h:outputLabel value="Smart Plug (Kitchen)"></h:outputLabel>
				<h:commandButton value="Turn ON" action="#{fLabBean.parseXML}"></h:commandButton>
				<h:commandButton value="Turn OFF" action="#{fLabBean.parseXML1}"></h:commandButton>
				<h:outputLabel value="#{fLabBean.messageXML }"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.power_usage1}  Watts"></h:outputLabel>
				<h:commandButton value="Turn ON" action="#{fLabBean.parseXML}" image="./arrow_refresh.png"></h:commandButton>
				
					<h:outputLabel value="Smart Plug (Living Room)"></h:outputLabel>
				<h:commandButton value="Turn ON" action="#{fLabBean.parseXML2}"></h:commandButton>
				<h:commandButton value="Turn OFF" action="#{fLabBean.parseXML3}"></h:commandButton>
				<h:outputLabel value="#{fLabBean.messageXML1 }"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.power_usage2}  Watts"></h:outputLabel>
					<h:commandButton value="Turn ON" action="#{fLabBean.parseXML2}" image="./arrow_refresh.png"></h:commandButton>
					
				</h:panelGrid></h3>
			 <br/><br/>
<h3>Zigbee Devices</h3><h3>
		<h:panelGrid columns="2" border="1">
					<h3>Select a mote</h3>
					<h:selectOneMenu value="#{fLabBean.selectedMote}" id="dD" > <f:selectItems value="#{fLabBean.moteList}"/></h:selectOneMenu>
					<h:outputText value="#{fLabBean.message }"></h:outputText>
					<h:commandButton value="Submit" action="#{fLabBean.valueChanged}"></h:commandButton>
					

				</h:panelGrid>
<br><br><br>
				<h:panelGrid columns="2" border="1">
					<h:outputLabel value="#{fLabBean.sM_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.sM}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.location_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.location}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.date_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.date_Value}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.time_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.time_Value}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.light_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.light_Value}"></h:outputLabel>

					<h:outputLabel value="#{fLabBean.humidity_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.humidity_Value}"></h:outputLabel>
				
				<h:outputLabel value="#{fLabBean.temp_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.temp_Value}"></h:outputLabel>
				<h:outputLabel value="#{fLabBean.sound_Label}"></h:outputLabel>
					<h:outputLabel value="#{fLabBean.sound_Value}"></h:outputLabel>
				</h:panelGrid>





			</h3>






			</center>
</h:form>
		

	</f:view>
</body>
</html>